package net.zdreamer.geracomium.adapter;

import java.util.List;

import com.example.geracomium.R;

import net.zdreamer.geracomium.entity.GeracomiumReserveInfos.AreaInfos.AreaInfo;
import net.zdreamer.geracomium.ui.home.ReserveAreaActivity;
import net.zdreamer.geracomium.utils.tools_utils.ViewHolder;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;

public class AreaInfoAdapter extends MyBaseAdapter<AreaInfo> {

	public AreaInfoAdapter(Context context, List<AreaInfo> list, int res) {
		super(context, list, res);
	}

	@Override
	protected View getView(int position, View convertView, ViewGroup parent,
			AreaInfo value) {
		ImageView imageView = ViewHolder.get(convertView, R.id.button_reserve);
		convertView.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(getmContext(), ReserveAreaActivity.class);
				intent.putExtra("witch", 0);
				getmContext().startActivity(intent);
			}
		});
		return convertView;
	}

}
